package com.lqs;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;


public class Lists {
	public static void Listss(){
		List<String> list  =   new  ArrayList<String>(); 
        list.add("a");
        list.add("b");
        list.add("c");
        list.add("a");
        list.add("b");
        list.add("d");
        System.out.print("去重前：");
        for (Object object : list) {
            System.out.print(object + ",");
        }
        System.out.print("\n"); 
        List newList = new ArrayList(new HashSet(list));
        System.out.println( "去重后的集合： " + newList); 
     }	 
     public static void main(String[] args){
	Listss();
}
}